package com.mask.sca.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mask.sca.product.entity.Spu;
import com.mask.sca.product.mapper.TSpuMapper;
import com.mask.sca.product.service.TSpuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author：jian
 * @Package：com.mask.sca.product.service.impl
 * @Project：mask-sca-cloud
 * @name：TSpuServiceImpl
 * @Date：2025/7/25 23:05
 * @Filename：TSpuServiceImpl
 */
@Service
public class TSpuServiceImpl implements TSpuService {

    @Resource
    private TSpuMapper spuMapper;
    @Override
    public List<Spu> getProductList(Long categoryId) {
        QueryWrapper<Spu> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(Spu::getCategoryId,categoryId);
        List<Spu> spuList = spuMapper.selectList(queryWrapper);
        return spuList;
    }
}
